package com.cj.stock.controller;

import com.cj.common.config.handerconfig.IgnoreToken;
import com.cj.common.response.Result;
import com.cj.stock.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author cheng jun
 * @Description:
 * @Date 2021/9/5 23:02
 */
@Controller
@RequestMapping(value = "/category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @RequestMapping(value = "/findCategory", method = RequestMethod.GET)
    @ResponseBody
//    @IgnoreToken
    public Result findCategory() {
        return Result.success(categoryService.findCategory());
    }
}
